using System.ComponentModel.DataAnnotations;
using System.Data.Entity.ModelConfiguration;
using SalesPages.DomainModel;
namespace SalesPages.EntityFrameworkRepository.Mapping
{
    public class ETContactUMap : EntityTypeConfiguration<ETContactU>
    {
        public ETContactUMap()
        {
            // Primary Key
            this.HasKey(t => t.ID);

            // Properties
            this.Property(t => t.LastName)
                .HasMaxLength(100);

            this.Property(t => t.FirstName)
                .HasMaxLength(100);

            this.Property(t => t.Email)
                .HasMaxLength(200);

            this.Property(t => t.MobilePhone)
                .IsFixedLength()
                .HasMaxLength(11);

            this.Property(t => t.Telephone)
                .HasMaxLength(50);

            this.Property(t => t.Age)
                .HasMaxLength(10);

            this.Property(t => t.State)
                .HasMaxLength(10);

            this.Property(t => t.City)
                .HasMaxLength(50);

            this.Property(t => t.District)
                .HasMaxLength(50);

            this.Property(t => t.EmailEnglish)
                .HasMaxLength(50);

            this.Property(t => t.EmailList)
                .HasMaxLength(50);

            this.Property(t => t.FormType)
                .HasMaxLength(200);

            this.Property(t => t.Partner)
                .HasMaxLength(50);

            this.Property(t => t.Local)
                .IsFixedLength()
                .HasMaxLength(2);

            this.Property(t => t.Lang)
                .IsFixedLength()
                .HasMaxLength(2);

            this.Property(t => t.Etag)
                .HasMaxLength(100);

            this.Property(t => t.DeviceType)
                .HasMaxLength(50);

            this.Property(t => t.OS)
                .HasMaxLength(50);

            this.Property(t => t.LeadFormVersion)
                .HasMaxLength(50);

            // Table & Column Mappings
            this.ToTable("ETContactUs");
            this.Property(t => t.ID).HasColumnName("ID");
            this.Property(t => t.LastName).HasColumnName("LastName");
            this.Property(t => t.FirstName).HasColumnName("FirstName");
            this.Property(t => t.Email).HasColumnName("Email");
            this.Property(t => t.MobilePhone).HasColumnName("MobilePhone");
            this.Property(t => t.Telephone).HasColumnName("Telephone");
            this.Property(t => t.Age).HasColumnName("Age");
            this.Property(t => t.State).HasColumnName("State");
            this.Property(t => t.City).HasColumnName("City");
            this.Property(t => t.District).HasColumnName("District");
            this.Property(t => t.EmailEnglish).HasColumnName("EmailEnglish");
            this.Property(t => t.EmailList).HasColumnName("EmailList");
            this.Property(t => t.FormType).HasColumnName("FormType");
            this.Property(t => t.Partner).HasColumnName("Partner");
            this.Property(t => t.Local).HasColumnName("Local");
            this.Property(t => t.Lang).HasColumnName("Lang");
            this.Property(t => t.Etag).HasColumnName("Etag");
            this.Property(t => t.DeviceType).HasColumnName("DeviceType");
            this.Property(t => t.OS).HasColumnName("OS");
            this.Property(t => t.LeadFormVersion).HasColumnName("LeadFormVersion");
            this.Property(t => t.InsertDate).HasColumnName("InsertDate");
        }
    }
}
